import { ByteStream } from "../tools/ByteStream";
import { GetByteStream } from "../tools/encryp";
import { DWORD, BYTE, WORD, LONG, TCHAR, BaseProto } from "./base.proto";
import CommConst from "../const/CommConst";
//Request///////////////////////////////////////////

/**请求主界面*/
export class Req_GP_MAIN
{
    dwUserID:number;					//DWORD	用户 UserID
    szToken:string;			            //TCHAR	TOKEN [TOKEN_LEN]

    decode(UserID:number,token:string)
    {
        let bStream:ByteStream = GetByteStream.getStream(CommConst.Req_LOGIN,0,40);

        this.dwUserID = UserID;
        this.szToken = token;

        bStream.writeUint(this.dwUserID);
        bStream.writeString(this.szToken,CommConst.TOKEN_LEN);
        
        return bStream.buffer;
    }
};